package com.nnnu.wsnackshop.pojo.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品SKU表
 * </p>
 *
 * @author zk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("product_sku")
public class ProductSku implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * SKU ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 所属SPU ID
     */
    private Integer spuId;

    /**
     * 商品ID，关联 products.id
     */
    private Integer productId;

    /**
     * SKU 标题
     */
    private String title;

    /**
     * SKU 图片JSON
     */
    private String images;

    /**
     * 销售价
     */
    private BigDecimal price;

    /**
     * 原价
     */
    private BigDecimal originalPrice;

    /**
     * 进货价
     */
    private BigDecimal costPrice;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 规格组合标识
     */
    private String specSnCombination;

    /**
     * 规格JSON
     */
    private String specs;

    /**
     * 是否上架
     */
    private Boolean saleable;

    /**
     * 是否有效
     */
    private Boolean valid;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @TableField("is_deleted")
    private Boolean isDeleted;

    /**
     * 商品编码
     */
    @TableField("sku_code")
    private String skuCode;
}
